package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import com.rockcent.mall.lib.domain.enumclass.CustomerShareStatus;
import com.rockcent.mall.lib.domain.enumclass.ProductStatus;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.math.BigDecimal;

/**
 * Created by marco on 2017/6/21.
 */
@Entity
@Table(name = "customer_share")
@DynamicInsert
@DynamicUpdate
public class CustomerShare extends IDEntityMall {

    @Column(columnDefinition = "bigint comment '平台ID'")
    private Long mallId;

    @Column(columnDefinition = "bigint comment '客户ID'")
    private Long customerId;

    @Column(columnDefinition = "varchar(255) comment '用户图片链接'")
    private String userImageUrl;

    @Column(columnDefinition = "varchar(150) comment '用户名称'")
    private String userName;

    @Column(columnDefinition = "bigint comment '产品id'")
    private Long productId;

    @Column(columnDefinition = "varchar(255) comment '产品图片链接'")
    private String productImageUrl;

    @Column(columnDefinition = "varchar(20) comment '类型 GOODS(\"商品\"), SERVICE(\"服务\")'")
    private String productType;

    @Column(columnDefinition = "DECIMAL(30,10) comment '原价'")
    private BigDecimal originalPrice;

    @Column(columnDefinition = "DECIMAL(30,10) comment '友价'")
    private BigDecimal friendPrice;

    @Column(columnDefinition = "varchar(255) comment '分享标题'")
    private String shareTitle;

    @Column(columnDefinition = "varchar(5000) comment '分享内容'")
    private String shareContent;

    @Column(columnDefinition = "varchar(20) comment '状态'")
    @Enumerated(EnumType.STRING)
    private CustomerShareStatus status;

    @Column(columnDefinition = "varchar(200) comment '分享码'")
    private String shareCode;

    public Long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    public String getUserImageUrl() {
        return userImageUrl;
    }

    public void setUserImageUrl(String userImageUrl) {
        this.userImageUrl = userImageUrl;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getProductImageUrl() {
        return productImageUrl;
    }

    public void setProductImageUrl(String productImageUrl) {
        this.productImageUrl = productImageUrl;
    }

    public String getProductType() {
        return productType;
    }

    public void setProductType(String productType) {
        this.productType = productType;
    }

    public BigDecimal getOriginalPrice() {
        return originalPrice;
    }

    public void setOriginalPrice(BigDecimal originalPrice) {
        this.originalPrice = originalPrice;
    }

    public BigDecimal getFriendPrice() {
        return friendPrice;
    }

    public void setFriendPrice(BigDecimal friendPrice) {
        this.friendPrice = friendPrice;
    }

    public String getShareTitle() {
        return shareTitle;
    }

    public void setShareTitle(String shareTitle) {
        this.shareTitle = shareTitle;
    }

    public String getShareContent() {
        return shareContent;
    }

    public void setShareContent(String shareContent) {
        this.shareContent = shareContent;
    }

    public Long getMallId() {
        return mallId;
    }

    public void setMallId(Long mallId) {
        this.mallId = mallId;
    }

    public CustomerShareStatus getStatus() {
        return status;
    }

    public void setStatus(CustomerShareStatus status) {
        this.status = status;
    }

    public String getShareCode() {
        return shareCode;
    }

    public void setShareCode(String shareCode) {
        this.shareCode = shareCode;
    }

    @Override
    public String toString() {
        return "CustomerShare{" +
                "customerId=" + customerId +
                ", userImageUrl='" + userImageUrl + '\'' +
                ", id=" + id +
                ", status=" + status +
                ", mallId=" + mallId +
                ", userName='" + userName + '\'' +
                ", productId=" + productId +
                ", productImageUrl='" + productImageUrl + '\'' +
                ", productType='" + productType + '\'' +
                ", originalPrice=" + originalPrice +
                ", friendPrice=" + friendPrice +
                ", shareTitle='" + shareTitle + '\'' +
                ", shareCode='" + shareCode + '\'' +
                ", shareContent='" + shareContent + '\'' +
                '}';
    }
}
